package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.MedicalTechnologyQuery;
import com.mk.admin.model.vo.MedicalTechnologyVo;
import com.mk.admin.service.MedicalTechnologyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/medicalTechnology")
@Api(tags = "医技预约")
public class MedicalTechnologyController {
    @Autowired
    private MedicalTechnologyService medicalTechnologyService;

    @PostMapping("/select")
    @ApiOperation("医技套餐预约查询")
    public ResultDto select(@RequestBody MedicalTechnologyQuery query) {
        return medicalTechnologyService.select(query);
    }


    @PostMapping("/id")
    @ApiOperation("医技套餐预约查询")
    public ResultDto id(@RequestBody MedicalTechnologyVo vo) {
        return medicalTechnologyService.id(vo.getId());
    }

    @PostMapping("/add")
    @ApiOperation("医技套餐预约增加")
    public ResultDto add(@RequestBody MedicalTechnologyVo vo) {
        return medicalTechnologyService.add(vo);
    }

    @PostMapping("/update")
    @ApiOperation("医技套餐预约修改")
    public ResultDto update(@RequestBody MedicalTechnologyVo vo) {
        return medicalTechnologyService.update(vo);
    }

    @PostMapping("/delete")
    @ApiOperation("医技套餐预约增加")
    public ResultDto delete(@RequestBody MedicalTechnologyVo vo) {
        return medicalTechnologyService.delete(vo.getId());
    }

    @PostMapping("/status")
    @ApiOperation("医技套餐预约状态")
    public ResultDto status(@RequestBody MedicalTechnologyVo vo) {
        return medicalTechnologyService.status(vo.getId());
    }
}
